JavaScript Cloud Native Development Cookbook by John Gilbert

JavaScript Cloud Native Development Cookbook by John Gilbert
Author: John Gilbert
Language: eng
Format: epub, pdf
Tags: COM051260 - COMPUTERS / Programming Languages / JavaScript, COM091000 - COMPUTERS / Cloud Computing, COM051440 - COMPUTERS / Software Development and Engineering / Tools
Publisher: Packt Publishing
Published: 2018-09-27

$ sls invoke -f load -r us-east-1 -s $MY_STAGE -d '{"id":"44444444-7777-1111-1111-000000000000","name":"thing one"}'

{

"ETag": "\"3f4ca01316d6f88052a940ab198b2dc7\""

}

Invoke the endpoint shown in the stack output with the following curl commands:

$ curl -v -H "Authorization: Bearer 1234567890" https://<see stack output>.cloudfront.net/things/44444444-7777-1111-1111-000000000000 | json_pp

...

> Authorization: Bearer 1234567890

>

< HTTP/1.1 200 OK

...

{

"name" : "thing one",

"id" : "44444444-7777-1111-1111-000000000000"

}